program p10_3;
var s:string;
    wc,i:integer;

begin
s:='man formats and displays the on-line manual pages. If you specify section,  man  only looks in that section of the manual.';
wc:=1;

for i:=1 to length(s)-1 do if (s[i]=' ') and (s[i+1]<>' ') then
	inc(wc);

writeln(wc);
end.
